
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/vectrics.tld"    prefix="vectrics" %>

<%@ page import="org.vectrics.recruiter.struts.admin.JobCandidateForm" %>


<jsp:useBean id="jobCandidateForm" class="org.vectrics.recruiter.struts.admin.JobCandidateForm" scope="request"/>
<%
  String functionCode = "";
  if (request.getAttribute("function")!= null) {
       functionCode = request.getAttribute("function").toString();  
  }
  String jobId = (String) request.getAttribute("jobId");
  String hiredNote = (String) request.getAttribute("hiredNote");
%>
<script type="text/javascript" src="/hrs-intranet/js/utils.js" > </script>

<vectrics:errors/>

<html:form action="/admin/jobs/candidate/hired/save" method="POST">
	<html:hidden property="jobCandidateId"/>
	<html:hidden property="jobId"/>
	<html:hidden property="personId"/>
    <html:hidden property="candidateName"/>
    <html:hidden property="jobTitle"/>
    <html:hidden property="resumeId"/>
    <html:hidden property="note"/>
	<html:hidden property="strength"/>

	<table width="600">
		<tr>
			<td width="50%">
				<table cellpadding="4" cellspacing="1">
					<tr>
						<td class="formBg1" valign="top" width="40%" >
							<font class="subFont">
								<bean:message key="prompt.job.title"/>
							</font>
						</td>
						<td class="formBg1" valign="top" >
							<font class="subFont">
								<bean:write name="jobCandidateForm" property="jobTitle"/>
							</font>
						</td>
					</tr>
					<tr>
						<td class="formBg2" valign="top" >
							<font class="subFont">
								<bean:message key="prompt.candidate.name"/>
							</font>
						</td>
						<td class="formBg2" valign="top" >
							<font class="subFont">
								<bean:write name="jobCandidateForm" property="candidateName"/>
							</font>
						</td>
					</tr>
					<tr>
						<td class="formBg1" valign="top">
							<font class="subFont">
								<bean:message key="prompt.employee.date.start"/> *
							</font>
						<vectrics:errors property="dateStart" />
						</td>
						<td class="formBg1" valign="top">
							<html:text property="dateStart" styleClass="formButton" styleId="dateStart" />
							<input type="button" id="dateStartBt" name="dateStartBt" value="..." /> 
										<script type="text/javascript">
  												Calendar.setup(
    												{
      												inputField  : "dateStart",         // ID of the input field
      												ifFormat    : "%d/%m/%Y",    // the date format
      												button      : "dateStartBt"       // ID of the button
    												}
  												);
										</script>
						</td>
					</tr>
					<tr>
						<td class="formBg1" valign="top" >
							<font class="subFont">
								<bean:message key="prompt.employee.condition"/>
							</font>
						</td>
						<td class="formBg1" valign="top" >
							 <vectrics:termsCombo jobId="<%= jobId %>" property="status"/>
						</td>
					</tr>
					<tr>
						<td class="formBg1" valign="top">
							<font class="subFont">
								<bean:message key="prompt.employee.function"/> <b>*</b>
							</font>
						</td>
						<td class="formBg1" valign="top">
							<vectrics:jobFunctionCombo property="function" value="<%=functionCode %>" /> 
						</td>
					</tr>

					<tr> 
						<td class="formBg1" valign="top">
							<font class="formLabelClass"><bean:message key="prompt.employee.career.rolePosition"/> <b>*</b> </font>
						</td>
						<td class="formBg1" valign="top">
							<html:text styleClass="formButton" maxlength="3" property="careerRolePosition" onkeypress="return soloNumerosConNegativos(event,this);" /><font class="formLabelClass">&nbsp; %</font>
           				</td>
					</tr>

					<tr> 
						<td class="formBg1" valign="top">
							<font class="formLabelClass"><bean:message key="prompt.employee.hoursPerDay"/> <b>*</b> </font>
						</td>
						<td class="formBg1" valign="top">
							<html:text styleClass="formButton"  maxlength="5" property="hoursPerDay" onkeypress="return soloNumeros(event,this);" />
           				</td>
					</tr>

					<tr> 
						<td class="formBg1" valign="top">
							<font class="formLabelClass"><bean:message key="prompt.employee.office.location"/> <b>*</b> </font>
						</td>
						<td class="formBg1" valign="top">
                            <vectrics:locationPicker 
                                   typeCode="job.location"
                                   caption="prompt.city" 
                                   paramName="location" 
                                   popupLeft="200" 
                                   popupTop="80" 
                                   styleClase="formStaticClass"
                                   canSelecction="state" />
                        </td>
					</tr>

					<tr> 
						<td class="formBg1" valign="top">
							<font class="formLabelClass"><bean:message key="prompt.employee.mentor"/> </font>
						</td>
						<td class="formBg1" valign="top">
							<vectrics:personPicker 
								remoteMethod="get.matching.employee"
								contextPath="/hrs-intranet"
								caption="Mentor"
								paramName="idMentor"
								popupLeft="200"
								popupTop="90"
								styleClase="formStaticClass"/>
           				</td>
					</tr>

					<tr>
						<td class="formBg1" valign="top">
							<font class="subFont">
								<bean:message key="prompt.employee.hiring.notes"/>
							</font>
						</td>
						<td class="formBg1" valign="top">
							<html:textarea property="hiringNote" value="<%=hiredNote %>"
							               styleClass="formTextAreaClass" 
							               rows="4" cols="61" 
							                />
						</td>
					</tr>
					<tr>
						<td valign="TOP" align="left"></td>
						<td valign="TOP" align="left">
							<vectrics:formButton elementId="ok.btn" code="button.ok" phraseCode="button.ok" value="submit" name="submit"/>
							&nbsp;
							<vectrics:formButton elementId="cancel.btn" code="button.cancel" phraseCode="button.cancel" value="cancel" name="cancel"/>						
						</td>
						<td></td>
					</tr>

				</table>
			</td>
			
		</tr>
	</table>
	
</html:form>

